/*package com.hy.erp.inventory.service ;

import java.util.List ;

import javax.ejb.Stateless ;

import org.jboss.seam.annotations.Name ;
import org.jboss.seam.annotations.Transactional ;

import com.hy.enterprise.architecture.foundation.ArchitectureFoundationException;
import com.hy.enterprise.framework.service.business.AbstractBusinessService;
import com.hy.erp.inventory.dao.interfaces.IPhysiqueCharacterDao;
import com.hy.erp.inventory.dao.interfaces.IPhysiqueCharacterTypeDao;
import com.hy.erp.inventory.pojo.PhysiqueCharacterType;
import com.hy.erp.inventory.pojo.interfaces.IPhysiqueCharacter;
import com.hy.erp.inventory.pojo.interfaces.IPhysiqueCharacterType;
import com.hy.erp.inventory.service.interfaces.IPhysiqueCharacterTypeService;

@ Name ( "physiqueCharacterTypeService" )
@ Stateless
@ Transactional
public class PhysiqueCharacterTypeService
											extends
											AbstractBusinessService < IPhysiqueCharacterType >
																								implements
																								IPhysiqueCharacterTypeService
{

	@ Override
	public boolean addPhysiqueCharacterType (
												IPhysiqueCharacterType physiqueCharacterType )
	{

		if ( null == physiqueCharacterType )
		{
			return true ;
		}
		else
		{
			IPhysiqueCharacterTypeDao physiqueCharacterTypeDao =
																	( IPhysiqueCharacterTypeDao ) this
																										.getDao ( IPhysiqueCharacterType.class ) ;
			return physiqueCharacterTypeDao
											.persist ( physiqueCharacterType ) ;
		}

	}

	@ Override
	public boolean modifyPhysiqueCharacterType (
													IPhysiqueCharacterType physiqueCharacterType )
	{
		if ( ( null == physiqueCharacterType )
				|| ( null == physiqueCharacterType
													.getIdentifier ( ) )
				|| ( 0 == physiqueCharacterType
												.getIdentifier ( )
												.length ( ) ) )
		{
			return true ;
		}
		else
		{
			IPhysiqueCharacterTypeDao physiqueCharacterTypeDao =
																	( IPhysiqueCharacterTypeDao ) this
																										.getDao ( IPhysiqueCharacterType.class ) ;
			if ( null == physiqueCharacterType )
			{
				throw new ArchitectureFoundationException (
															"修改实体数据时发生错误，所需要修改的实体在数据库中并不存在" ) ;
			}
			return physiqueCharacterTypeDao
											.merge ( physiqueCharacterType ) != null ;
		}

	}

	@ Override
	public Integer removePhysiqueCharacterType (
													String [ ] physiqueCharacterTypeIds )
	{
		if ( ( null == physiqueCharacterTypeIds )
				|| ( 0 == physiqueCharacterTypeIds.length ) )
		{
			return new Integer (
									0 ) ;
		}
		else
		{
			IPhysiqueCharacterTypeDao physiqueCharacterTypeDao =
																	( IPhysiqueCharacterTypeDao ) this
																										.getDao ( IPhysiqueCharacterType.class ) ;
			return physiqueCharacterTypeDao
											.remove ( physiqueCharacterTypeIds ) ;
		}

	}

	@ Override
	public String [ ] addPhysiqueCharacterType (
													Object [ ] objects )
	{
		IPhysiqueCharacterTypeDao physiqueCharacterTypeDao =
			( IPhysiqueCharacterTypeDao ) this
												.getDao ( IPhysiqueCharacterType.class ) ;
		PhysiqueCharacterType[] types=new PhysiqueCharacterType[objects.length];
		for ( int i =
						0 ; i < objects.length ; i ++ )
		{
			PhysiqueCharacterType type=( PhysiqueCharacterType ) objects[i];
			types[i]=type;
		}
		return physiqueCharacterTypeDao.persist ( types ) ;
	}

	@ Override
	public List < IPhysiqueCharacterType > getAllPhysiqueCharacterType ( )
	{
		IPhysiqueCharacterTypeDao physiqueCharacterTypeDao =
			( IPhysiqueCharacterTypeDao ) this
												.getDao ( IPhysiqueCharacterType.class ) ;
		return physiqueCharacterTypeDao.find ( ) ;
	}

	@ Override
	public String [ ] modifyPhysiqueCharacterType (
													Object [ ] objects )
	{

		if (  null == objects ) 
				{
					return null;
				}
				else
				{
					IPhysiqueCharacterTypeDao physiqueCharacterTypeDao =
						( IPhysiqueCharacterTypeDao ) this
															.getDao ( IPhysiqueCharacterType.class ) ;
					PhysiqueCharacterType[] types=new PhysiqueCharacterType[objects.length];
		            for(int i=0;i<objects.length;i++)
		            {
		            	PhysiqueCharacterType type=( PhysiqueCharacterType ) objects[i];
		            	types[i]=type;
		            }
					
					return physiqueCharacterTypeDao.merge ( types );
				}
	}

}*/
